package log4J;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.xml.DOMConfigurator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DemoLog4J {
	public static void main(String[] args) {
		Date timeNow = new Date(System.currentTimeMillis());
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_hhmmss");
		String subString = sdf.format(timeNow);
		System.out.println(subString);
//		Load file config log
		DOMConfigurator.configureAndWatch(Constant.CONFIG_FOLDER + "configlog.log4j.xml");
		Logger logger = LoggerFactory.getLogger("DBChecker");
		logger.info("test choi choi");
	}
}
